﻿using System.Web.Mvc;
using Ninject.Modules;
using Ninject.Web.Mvc.FilterBindingSyntax;
using PCE.Mvc.Filters;
using PCE.NH.AoP;

namespace PCE.Configuration.IoC.Modules
{
	public class ControllerModule : NinjectModule
	{
		public override void Load()
		{
			this.BindFilter<NHConversationFilter>(FilterScope.Action, 100)
				.WhenActionMethodHas<PersistanceRequiredAttribute>()
				.InSingletonScope();
		}
	}
}